package com.yfq.test;

import com.yfq.springframework.beans.annotation.Autowired;
import com.yfq.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 姚凤桥
 * @date 2023/2/5 17:11
 * @description
 */
@Component
public class UserDao {
    @Autowired
    private UserService userService;

    private static Map<String, String> map = new HashMap<>();

    static {
        map.put("1", "蔡徐坤");
        map.put("2", "吴亦凡");
        map.put("3", "罗志祥");
    }

    public String getUsername(String id) {
        return map.get(id);
    }
}
